<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<!-- Form to create a new calendar -->
<ui:composition template="/templates/master_template.xhtml"
    xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://xmlns.jcp.org/jsf/html"
    xmlns:p="http://primefaces.org/ui"
    xmlns:f="http://xmlns.jcp.org/jsf/core"
    xmlns:ui="http://java.sun.com/jsf/facelets">
    
    <ui:define name="title">Create calendar</ui:define>

    <ui:define name="content">
        
        
        <p:panel id="create_calendar_container">
            
            <h1>Create calendar</h1>
            
            <h:form>
                
                <p>
                    Get started by creating your calendar. It's easy, just tell us what is bad weather for you.
                </p>

                <p:panelGrid columns="2" styleClass="table_no_border bad_weather_selection_table">

                    <p:outputLabel value="I don't like rain" for="rainIsBad"/>
                    <p:selectBooleanCheckbox  id="rainIsBad" value="#{calendarBean.current.rainIsBad}"/>
                    
                    <p:outputLabel value="I don't like clouds" for="cloudyIsBad"/>
                    <p:selectBooleanCheckbox  id="cloudyIsBad" value="#{calendarBean.current.cloudyIsBad}"/>
                    
                    <p:outputLabel value="I don't like snow" for="snowIsBad"/>
                    <p:selectBooleanCheckbox  id="snowIsBad" value="#{calendarBean.current.snowIsBad}"/>
                    
                </p:panelGrid>
                
                <p:commandButton value="Create calendar" action="#{calendarBean.create()}"/>
                
            </h:form>
        </p:panel>
    </ui:define>
</ui:composition>